package com.lktx.sso.controller;

import cn.hserver.core.ioc.annotation.Autowired;
import cn.hserver.plugin.web.annotation.Controller;
import cn.hserver.plugin.web.annotation.GET;
import com.lktx.sso.service.OpenIdConfigurationService;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class OpenidConfigurationController {

    @Autowired
    private OpenIdConfigurationService openIdConfigurationService;

    @GET("/{appId}/.well-known/openid-configuration")
    public Map<String, Object> getOpenidConfiguration(String appId) {
        return openIdConfigurationService.getOpenidConfiguration(appId);
    }

    @GET("/{appId}/.well-known/jwks.json")
    public Map<String, Object> jws(String appId) {
        return openIdConfigurationService.jws(appId);
    }

}
